package com.fastloan.mgt.postloan.enums;

/**
 * Created by gelon on 2017/11/16.
 */
public class PostLoanEnums {

    public enum ImplementType{

        VISIT("上门",1),//上门
        CALL("电话",2),//电话
        NOTE("短信",3)//短信
        ;
        Integer code;
        String name;

        public void setCode(Integer code){
            this.code = code ;
        }

        public Integer getCode(){
            return this.code ;
        }

        public void setName(){
            this.name = name ;
        }

        public String getName(){
            return this.name ;
        }

        ImplementType (String name,Integer code) {
            this.code = code ;
            this.name = name ;
        }

        public String jsonStr(Object param){
            if(param instanceof String){
                return "\"" + param + "\"";
            }else{
                return param.toString();
            }
        }


        public String toString(){
            return "{\"code\":" + jsonStr(code) + ",\"name\":" + jsonStr(name) + "}";
        }

    }


    public enum SetupType{

        MAKE_LOANS_FIRST("放款后首次贷后监控",1),//放款后首次贷后监控
        AFTER_FIRST_LOAN("首次贷后监控后监控",2),//首次贷后监控后监控
        FIELD_VISIT("实地回访",3),//实地回访
        MANUAL("手动",4),//手动
        AFTER_FAIL_RETRY("失败后再次拜访",5);

        Integer code;
        String name;

        public void setCode(Integer code){
            this.code = code ;
        }

        public Integer getCode(){
            return this.code ;
        }

        public void setName(){
            this.name = name ;
        }

        public String getName(){
            return this.name ;
        }

        SetupType ( String name , Integer code) {
            this.code = code ;
            this.name = name ;
        }

        public String jsonStr(Object param){
            if(param instanceof String){
                return "\"" + param + "\"";
            }else{
                return param.toString();
            }
        }


        public String toString(){
            return "{\"code\":" + jsonStr(code) + ",\"name\":" + jsonStr(name) + "}";
        }

    }


    public enum ImplementResult{

        UNFINISH("未完成",0),//未完成
        SUCCESS("成功",1),//成功
        FAILURE("失败",2),//失败
        FRILURE_RETRY("失败-已重试",3),//失败已加重试任务
        UNKNOWN("未知", -999);//未知

        Integer code;
        String name;

        public void setCode(Integer code){
            this.code = code ;
        }

        public Integer getCode(){
            return this.code ;
        }

        public void setName(){
            this.name = name ;
        }

        public String getName(){
            return this.name ;
        }

        ImplementResult (String name,Integer code) {
            this.code = code ;
            this.name = name ;
        }

        public String jsonStr(Object param){
            if(param instanceof String){
                return "\"" + param + "\"";
            }else{
                return param.toString();
            }
        }


        public String toString(){
            return "{\"code\":" + jsonStr(code) + ",\"name\":" + jsonStr(name) + "}";
        }

    }






}
